load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")

package(default_visibility = ["//visibility:public"])

ts_library(
    name = "directive-forest",
    srcs = glob(
        include = ["*.ts"],
        exclude = ["*.spec.ts"],
    ),
    deps = [
        "//devtools/projects/ng-devtools-backend/src/lib:highlighter",
        "//devtools/projects/ng-devtools-backend/src/lib:interfaces",
        "//devtools/projects/ng-devtools-backend/src/lib:utils",
        "//devtools/projects/ng-devtools-backend/src/lib:version",
        "@npm//semver-dsl",
    ],
)

karma_web_test_suite(
    name = "test",
    deps = [
        ":test_lib",
    ],
)

ts_test_library(
    name = "test_lib",
    srcs = [
        "render-tree.spec.ts",
    ],
    deps = [
        ":directive-forest",
        "//devtools/projects/ng-devtools-backend/src/lib:interfaces",
        "//devtools/projects/ng-devtools-backend/src/lib:utils",
        "@npm//@types",
    ],
)
